package com.example.quartzdemo.controller;

import com.example.quartzdemo.util.TaskScanner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/task-meta")
public class TaskMetaController {

    @Autowired
    private TaskScanner taskScanner;

    @GetMapping("/list")
    public List<Map<String, String>> listTaskMethods() {
        return taskScanner.getAvailableTasks();
    }
}

